package springframework.bean;

import com.qumoyugo.springframework.beans.BeansException;
import com.qumoyugo.springframework.beans.factory.FactoryBean;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Cedric
 * @date 2021/12/10 09:56
 * @description 类功能描述
 */
public class ConvertersFactoryBean implements FactoryBean<Set<?>> {
    @Override
    public Set<?> getObject() throws BeansException {
        HashSet<Object> converters = new HashSet<>();
        StringToLocalDateConverter converter = new StringToLocalDateConverter("yyyy-HH-mm");
        converters.add(converter);
        return converters;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
